package com.vanrui.pcp.autocode.utils;

import org.apache.log4j.Logger;

public class BeanUtil {
	
	private final static Logger logger = Logger.getLogger(BeanUtil.class);
	
	
	public static Object getClassInstance(String className) throws Exception{
		try {
			return Class.forName(className).newInstance();
		} catch (InstantiationException e) {
			throw new Exception("实例化失败:"+className, e);
		} catch (IllegalAccessException e) {
			throw new Exception("不可实例化的类:"+className, e);
		} catch (ClassNotFoundException e) {
			throw new Exception("没有找到该类:"+className, e);
		}
	}

}
